<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Checks if a stream is a local stream</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.stream-get-wrappers.html">« stream_get_wrappers</a></li>
      <li style="float: right;"><a href="function.stream-isatty.html">stream_isatty »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.stream.html">Stream 函数</a></li>
    <li>Checks if a stream is a local stream</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.stream-is-local" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">stream_is_local</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.2.4, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">stream_is_local</span> &mdash; <span class="dc-title">Checks if a stream is a local stream</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.stream-is-local-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>stream_is_local</strong></span>(<span class="methodparam"><span class="type"><span class="type">resource</span>|<span class="type">string</span></span> <code class="parameter">$stream</code></span>): <span class="type">bool</span></div>

  <p class="para rdfs-comment">
   Checks if a stream, or a URL, is a local one or not.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.stream-is-local-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">stream</code></dt>

     <dd>

      <p class="para">
       The stream <span class="type">resource</span> or URL to check.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.stream-is-local-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>true</code></strong>， 或者在失败时返回 <strong><code>false</code></strong>。
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.stream-is-local-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-3774">
    <p><strong>示例 #1 <span class="function"><strong>stream_is_local()</strong></span> example</strong></p>
    <div class="example-contents"><p>
     Basic usage example.
    </p></div>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">stream_is_local</span><span style="color: #007700">(</span><span style="color: #DD0000">"http://example.com"</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">stream_is_local</span><span style="color: #007700">(</span><span style="color: #DD0000">"/etc"</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>以上例程的输出类似于：</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
bool(false)
bool(true)
</pre></div>
    </div>
   </div>
  </p>
 </div>




</div></div></div></body></html>